<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
	
	<head>
		<title>微商后台管理系统-修改游戏</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
		<link rel="icon" type="image/ico" href="/assets/images/favicon.ico" />
		<object th:remove="tag" th:include="admin/include/css-header :: css-header"></object>
		<object th:remove="tag" th:include="admin/include/js-header :: js-header"></object>
		<!-- DataTabel --> 	
	    <link rel="stylesheet" href="/assets/js/vendor/chosen/css/chosen.min.css"/>
	    <link rel="stylesheet" href="/assets/js/vendor/chosen/css/chosen-bootstrap.css"/>
	    <link rel="stylesheet" href="/assets/js/vendor/datatables/css/dataTables.bootstrap.css"/>
	    <link rel="stylesheet" href="/assets/js/vendor/datatables/css/ColVis.css"/>
	    <link rel="stylesheet" href="/assets/js/vendor/datatables/css/TableTools.css"/>
		<link type="text/css" rel="stylesheet" href="/assets/js/vendor/datepicker/bootstrap.datetimepicker.min.css" />
	</head>
	<body class="bg-3">
    <!-- 遮罩 -->
    <div class="mask"><div id="loader"></div></div>
    <!--/遮罩 -->
    <!-- 主体内容  -->
    <div id="wrap">
      <div class="row">
        <!-- 头部 和 左侧菜单 -->
        <object th:remove="tag" th:include="admin/include/header :: header"></object>
        <!-- /头部 和 左侧菜单 -->
        <!-- 中间内容 -->
        <div id="content" class="col-md-12">
          <!-- 中间内容头部 -->
          <div class="pageheader">
            <h2><i class="fa fa-lightbulb-o" style="line-height: 48px;padding-left: 0;"></i> 添加权限  <span></span></h2>
            <div class="breadcrumbs">
              <ol class="breadcrumb">
                <li><a href="/admin">首页</a></li>
                <li><a href="/admin/game">游戏列表</a></li>
                <li>修改游戏</li>
              </ol>
            </div>
          </div>
          <!-- /中间内容头部 -->
          <!-- 中间内容主体 -->
          <div class="main">
            <div class="row">
              <div class="col-md-11">
                <!-- tile -->
                <section class="tile color transparent-black">
                  <!-- tile header -->
                  <div class="tile-header">
                    <h1><strong>游戏表单</strong></h1>
                    <div class="controls">
                      <a href="javascirpt:void(0)" class="minimize"><i class="fa fa-chevron-down"></i></a>
                      <a href="javascirpt:void(0)" class="refresh"><i class="fa fa-refresh"></i></a>
                      <a href="javascirpt:void(0)" class="remove"><i class="fa fa-times"></i></a>
                    </div>
                  </div>
                  <!-- /tile header -->
                  <!-- tile body -->
                  <div class="tile-body">
                    <form class="form-horizontal" role="form" id="editForm"  action="/admin/game/eidt/${game.id}"  method="post">
                      <div class="form-group">
                        <label for="clearDate" class="col-sm-4 control-label">周几清零</label>
                        <div class="col-sm-8" id="selectbox2">
                          <select class="chosen-select chosen-transparent form-control" name="clearDate" id="clearDate">
	                            <option value="0" th:selected="${game.clearDate eq 0 }">不清零</option>
	                            <option value="1" th:selected="${game.clearDate eq 1 }">周一</option>
	                            <option value="2" th:selected="${game.clearDate eq 2 }">周二</option>
	                            <option value="3" th:selected="${game.clearDate eq 3 }">周三</option>
	                            <option value="4" th:selected="${game.clearDate eq 4 }">周四</option>
	                            <option value="5" th:selected="${game.clearDate eq 5 }">周五</option>
	                            <option value="6" th:selected="${game.clearDate eq 6 }">周六</option>
	                            <option value="7" th:selected="${game.clearDate eq 7 }">周日</option>
                          </select>
                        </div>
                      </div>
                    
                    <div class="form-group">
                        <label class="col-sm-4 control-label">记录日排行</label>
                        <div class="col-sm-8">
                          <div class="radio radio-transparent">
                            <input type="radio" name="dateRank"  th:checked="${game.dateRank eq true}" id="dateRank1" value="1" />
                            <label for="dateRank1">记录</label>
                            <input type="radio" name="dateRank"  th:checked="${game.dateRank eq false}" id="dateRank2" value="0" />
                            <label for="dateRank2">不记录</label>
                          </div>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="maxAssCount" class="col-sm-4 control-label">每日最多助力</label>
                        <div class="col-sm-5">
                          <input type="text" class="form-control" id="maxAssCount" name="maxAssCount" th:value="${game.maxAssCount}"/>
                        </div>
                        <label for="maxAssCount" class="col-sm-1 control-label">0为不限制</label>
                     </div>
                      
                    <div class="form-group">
                        <label for="maxScore" class="col-sm-4 control-label">最高分数</label>
                        <div class="col-sm-5">
                          <input type="text" class="form-control" id="maxScore" name="maxScore" th:value="${game.maxScore}"/>
                        </div>
                        <label for="maxAssCount" class="col-sm-1 control-label">0为不限制</label>
                    </div>
                      
                    <div class="form-group">
                        <label for="name" class="col-sm-4 control-label">游戏名称*</label>  
                        <div class="col-sm-8">
                          <input type="text" class="form-control" name="name" id="name" th:value="${game.name }"/>
                        </div>
                    </div>
                      
                    <div class="form-group">
                        <label for="searchKey" class="col-sm-4 control-label">关键词*</label>
                        <div class="col-sm-4">
                          <input type="text" class="form-control" id="searchKey" name="searchKey" th:value="${game.searchKey }"/>
                        </div>
                        <label for="maxAssCount" class="col-sm-3 control-label">多个关键词用英文";"分开</label>
                    </div>
                    
                    <div class="form-group">
                        <label for="startDate" class="col-sm-4 control-label">开始时间</label>
                        <div class="col-sm-8">
                          <input type="text" class="form-control datetimepicker datetimepicker-yyyy-MM-dd-HH-mm" id="startDate" th:value="${game.startDate}" name="startDate"/>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="endDate" class="col-sm-4 control-label">结束时间</label>
                        <div class="col-sm-8">
                          <input type="text" class="form-control datetimepicker datetimepicker-yyyy-MM-dd-HH-mm" id="endDate" name="endDate" th:value="${game.endDate}"/>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="remark" class="col-sm-4 control-label">游戏备注</label>
                        <div class="col-sm-8">
                          <textarea class="form-control" th:value="${game.remark}" id="remark" name="remark" rows="6" maxlength="200"></textarea>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-4 control-label">公众号</label>
                        <div class="col-sm-8">
                          <div class="radio radio-transparent">
                            <input type="radio" th:checked="${game.weixinFlag eq true}" name="weixinFlag" id="weixinFlag1" value="1" />
                            <label for="weixinFlag1">使用狼头公众号</label>
                            <input type="radio" th:checked="${game.weixinFlag eq false}" name="weixinFlag" id="weixinFlag2" value="0"/>
                            <label for="weixinFlag2">使用客户公众号</label>
                          </div>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="weiXinAccount" class="col-sm-4 control-label">微信帐号</label>
                        <div class="col-sm-8">
                          <input type="text" class="form-control" th:value="${game.weiXinAccount }" name="weiXinAccount" id="weiXinAccount"/>
                        </div>
                    </div>
                      
                    <div class="form-group">
                       	<label for="weiXinPassword" class="col-sm-4 control-label">微信密码</label>
                        <div class="col-sm-8">
                          <input type="text" class="form-control" th:value="${game.weiXinPassword}" name="weiXinPassword" id="weiXinPassword" />
                        </div>
                    </div>
                    
                     <div class="form-group">
                       	<label for="gamePath" class="col-sm-4 control-label">游戏地址</label>
                        <div class="col-sm-8">
                          <input type="text" class="form-control" th:value="${game.gamePath}" name="gamePath" id="gamePath" />
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="colorpicker-rgb" class="col-sm-4 control-label">游戏图片</label>
                        <div class="col-sm-8">
                          <div class="input-group">
                            <span class="input-group-btn">
                              <span class="btn btn-primary btn-file">
                                <i class="fa fa-upload"></i><input type="file" multiple=""/>
                              </span>
                            </span>
                            <input type="text" class="form-control" readonly=""/>
                          </div>
                        </div>
                    </div>
                      
                    <div class="form-group form-footer">
                        <div class="text-center">
                          <button type="submit" class="btn btn-primary" style="width:150px;">修改</button>
                        </div>
                    </div>
                    </form>
                  </div>
                  <!-- /tile body -->
                  </section>
              </div>
            </div>
          </div>
  	    <!-- /中间内容主体 -->
        </div>
        <!-- /中间内容 -->
      </div>
    </div>
	<!-- /主体内容  -->
	<object th:remove="tag" th:include="admin/include/js-footer :: js-footer"></object>
    <object th:remove="tag" th:include="admin/include/flashMessage :: flashMessage"></object>
	<script type="text/javascript" src="/lib/validate/jquery.validate.min.js"></script>
	<script src="/assets/js/vendor/momentjs/moment-with-langs.min.js"></script>
	<script src="/assets/js/vendor/chosen/chosen.jquery.min.js"></script>
	<script type="text/javascript" src="/assets/js/vendor/datepicker/bootstrap.datetimepicker.min.js"></script>
    <script type="text/javascript" src="/assets/js/vendor/datepicker/bootstrap.datetimepicker.zh-CN.min.js"></script>
    <script type="text/javascript" src="/assets/js/vendor/datepicker/bootstrap.datetimepicker.common.min.js"></script>
	<script>
	    $(function(){
	      //chosen select input
	      $('.btn-file :file').on('fileselect', function(event, numFiles, label) {
		        var input = $(this).parents('.input-group').find(':text'),
	            log = numFiles > 1 ? numFiles + ' files selected' : label;
	            console.log(log);
		        if( input.length ) {
		          input.val(log);
		        } else {
		          if( log ) alert(log);
		        }
   	     });
	      
	      $(".chosen-select").chosen({disable_search_threshold: 10});
	    })
    </script>
	<script src="/admin/js/game/add.js"></script>
  </body>
</html>